@import '../../styles.scss';

.ant-layout {
    background: rgb(235, 235, 235);
}

.ant-page-header {
    padding-left: 0;
}

nz-card {
    //box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    border: none;
    //border-radius: 12px !important;
}
.ant-card-head {
    //去除card的横线
    border-bottom: 0;
}
//卡片标题
.ant-card-head-title {
    font-family: PingFangSC-Medium;
    font-size: 15px;
    color: #333333;
    letter-spacing: 0;
    font-weight: 600;
}
.ant-card-body {
    padding: 1vw;
}

.trigger {
    font-size: 18px;
    padding: 0 16px;
    cursor: pointer;
    transition: color 0.3s;
}

//覆写组件样式
.ant-page-header {
    padding: 0;
}

//顶部标题
.ant-page-header-heading {
    padding-bottom: 10px;
}

//表格行内内容换行
.ant-table-tbody > tr > td {
    padding: 16px;
    word-break: break-word;
}

//时间选择器
.ant-calendar-picker {
    width: 100% !important;
}

//页头
.ant-page-header {
    background: transparent !important;
    padding: 0 !important;
}

//深色菜单
.ant-menu.ant-menu-dark .ant-menu-item-selected,
.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected {
    width: 100%;
}

.ant-menu-dark .ant-menu-item-selected > a,
.ant-menu-dark .ant-menu-item-selected .anticon + span,
.ant-menu-dark .ant-menu-item-selected > a:hover {
    color: #fff !important;
}

//垂直菜单设置菜单的内边距
.ant-menu-vertical {
    .ant-menu-item {
        padding: 0 32px !important;
    }
    .ant-menu-submenu-title {
        padding: 0 32px !important;
    }
}

//垂直菜单弹出的菜单内边距
.ant-menu-submenu-popup {
    .ant-menu-submenu-vertical {
        .ant-menu-submenu-title {
            padding: 0 16px !important;
        }
    }

    //垂直菜单设置子菜单的内边距
    .ant-menu-sub {
        .ant-menu-item {
            padding: 0 16px !important;
        }
    }
}

.ant-menu-item {
    margin-top: 0 !important;

    &:last-child {
        margin-bottom: 0 !important;
    }
}

//dropdown菜单鼠标滑过背景色
.ant-dropdown-menu-item:hover,
.ant-dropdown-trigger:hover {
    background: $global-color-1 !important;
}

//深色背景菜单去除内阴影
.ant-menu-dark .ant-menu-inline.ant-menu-sub {
    box-shadow: none !important;
}

//修改表格表头
.ant-table-thead > tr > th {
    background: rgb(253, 253, 253);
    padding: 4px 16px;
    text-align: center;
}

.ant-table {
    border: 1px solid #ebebeb !important;
    border-radius: 4px;
}

//修改表格内部格式
.ant-table-tbody > tr > td {
    text-align: center;
}

//表格默认字体颜色
.ant-table {
    color: rgba(0, 0, 0, 0.65);
}

//表格底部的样式
.ant-table-footer {
    font-size: 14px;
    text-align: right;
    padding: 16px !important;
    border-bottom: $border;
    //border-top: $border;
}

.ant-table-pagination.ant-pagination {
    padding-right: 16px;
}

.ant-table .ant-table-expanded-row-fixed {
    padding: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}
.ant-table-tbody > tr .ant-table-wrapper:only-child .ant-table {
    margin: 0 !important;
}

//日期选择器,数字输入框宽度
nz-date-picker,
nz-input-number {
    width: 100% !important;
}

//面包屑样式覆写
.ant-breadcrumb {
    color: #999;
}

.ant-breadcrumb-separator {
    @extend .ant-breadcrumb;
}

.ant-breadcrumb-link {
    @extend .ant-breadcrumb;
}

.ant-breadcrumb a {
    @extend .ant-breadcrumb;
}

.nz-breadcrumb-item:last-child {
    @extend .ant-breadcrumb;
}

.ant-page-header-title-view-title {
    @extend .ant-breadcrumb;
}

.ant-layout-sider-collapsed .nav-text {
    display: none;
}

.ant-layout-sider-collapsed .ant-menu-submenu-title:after {
    display: none;
}

.ant-layout-sider-collapsed .anticon {
    font-size: 16px;
    // margin-left: 8px;
}

.ant-collapse > .ant-collapse-item:last-child,
.ant-collapse > .ant-collapse-item:last-child > .ant-collapse-header {
    border-radius: 0;
}

//加载Loading提示组件的高度
.ant-spin-nested-loading {
    height: 100%;
}

.ant-spin-nested-loading > div > .ant-spin {
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ant-descriptions-item-label {
    width: 100px !important;
    font-weight: bold;
}

//描述组件
.ant-collapse-content-box {
    padding: 0 !important;
}

.ant-descriptions-bordered {
    .ant-descriptions-item-label {
        width: 160px !important;
    }
}

.package-standard {
    .ant-descriptions-item-label {
        width: 80px !important;
    }
}

.ant-descriptions-item-content {
    background: #fff;
    color: rgba(0, 0, 0, 0.5);
}

//选中的表格行背景色改变
.tr-selected {
    $color: #fefbef;
    background-color: $color !important;
    .ant-table-cell {
        background-color: $color;
    }
}

.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
    color: #fff;
    background-color: $global-color;
}

//子页面的内容布局
.layout-sub-page {
    background: #fff;
    border: $border;
    box-shadow: 0 4px 10px 0 rgba(20, 19, 34, 0.03), 0 0 10px 0 rgba(20, 19, 34, 0.02);
    .layout-sub-page-content {
        padding: 24px;
    }
}

.sub-page-wrapper {
    min-height: 156px;
    background-size: 100% 153px;
}

.sub-page-content {
    position: relative;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.bread-crumb {
    padding-bottom: 10px;
    width: 100%;
    display: flex;
    align-items: center;

    .ant-page-header-heading-title {
        font-size: 20px;
        margin-right: 15px;
        font-weight: 700;
        color: #666 !important;
    }
}

.header-operate {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*表格顶部操作区域*/
.table-action {
    display: flex;
    padding: 8px;
    min-height: 49px;
    border-bottom: $border;

    .left-operate {
        flex: 2;
        display: flex;
        align-items: center;

        //button {
        //    border: none;
        //
        //    i {
        //        font-size: 22px;
        //        color: $global-color;
        //    }
        //}
        button {
            border: none;
            color: $global-color;
            position: relative;

            i {
                color: $global-color;
            }

            &:hover {
                background: $global-color;
                color: #fff;

                i {
                    color: #fff;

                    svg {
                        stroke: #fff;
                    }
                }
            }
        }
    }

    .right-operate {
        button {
            border: none;
            color: $global-color;
            position: relative;

            i {
                color: $global-color;
            }

            &:hover {
                background: $global-color;
                color: #fff;

                i {
                    color: #fff;

                    svg {
                        stroke: #fff;
                    }
                }
            }
        }
    }

    button[disabled] {
        background: transparent;
        opacity: 0.5;

        &:hover {
            background: none;
            color: $global-color;
            border: none;

            i {
                color: $global-color;
            }
        }
    }
    &.inner {
        padding: 16px 24px;
    }
}

/*表格顶部操作区域*/
.table-head {
    display: flex;
    padding: 16px;
    min-height: 65px;
    border-bottom: $border;
}

.table-footer {
    padding: 16px;
}

.ant-btn {
    box-shadow: none !important;
}

//居中显示Modal
.vertical-center-modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

//.vertical-center-modal .ant-modal {
//    top: 0 !important;
//}
